import request from "../utils/request";
export const post = (taskInfo) => {
  return request({
    method: "POST",
    url: "/system/taskInfo/post",
    data: taskInfo
  });
};

export const getList = (cno) => {
    return request({
      method: "GET",
      url: "/system/taskInfo/getList",
      params:{
          cno
      }
    });
  };

  export const get = (id) => {
    return request({
      method: "GET",
      url: "/system/taskInfo/get",
      params:{
          id
      }
    })
  }

  export const update = (taskInfo) => {
    return request({
      method: "POST",
      url: "/system/taskInfo/update",
      data: taskInfo
    });
  };

  export const deleteById = (id) => {
    return request({
      method: "DELETE",
      url: "/system/taskInfo/delete",
      params: {
        id
      }
    })
  }

  export const writePost = (taskContent) => {
    return request({
      method: "POST",
      url: "/system/taskContent/post",
      data: taskContent
    });
  };

  export const getTaskContent = (sno,taskInfoId) => {
    return request({
      method: "GET",
      url: "/system/taskContent/get",
      params:{
        sno,
        taskInfoId,
      }
    });
  };
  
  export const getTaskContentById = (id) => {
    return request({
      method: "GET",
      url: "/system/taskContent/get_by_id",
      params:{
        id
      }
    });
  };
  export const getTaskPostList = (taskInfoId) => {
    return request({
      method: "GET",
      url: "/system/taskContent/get/postTaskList",
      params:{
        taskInfoId
      }
    });
  }